import request from '../utils/request';

export function queryPortfolioListApp(params) {
  return request({
    url: '/portfolio/list',
    params,
  });
}

export function queryPortfolioDetailApp(id) {
  return request({
    url: `/portfolio/${id}`,
  });
}

export function queryBargainList(id, params) {
  return request({
    url: `/portfolio/${id}/bargain/list`,
    params,
  });
}

export function queryHisProfit(id, params) {
  return request({
    url: `/portfolio/${id}/profit`,
    params,
  });
}

export function likePortfolio(id, isLike) {
  return request({
    url: `/portfolio/like/${id}`,
    method: 'post',
    data: {
      isLike,
    },
  });
}
